﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Nirvana
{
    public class LogUnity : ILogAppender
    {
        public void AppendLog(LogItem item)
        {
            string text = string.Format("[{0}][{1}]: {2}", item.ModuleName, item.RecordTime, item.Message);
            switch (item.Severity)
            {
                case LogSeverity.Debug:
                case LogSeverity.Info:
                    Debug.Log(text);
                    return;
                case LogSeverity.Warning:
                    Debug.LogWarning(text);
                    return;
                default:
                    Debug.LogError(text);
                    return;
            }

        }
    }
}

